package com.jch.helloworld.configBeans.generic;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 泛型注入示例
 * @param <T>
 */
public class BaseService<T> {

    // 此处的注解会被子类继承
    @Autowired
    protected BaseRepository<T> repository;

    public void add(){
        System.out.println("add...");
        System.out.println("repository: " + repository);
    }

}
